home *** CD-ROM | disk | FTP | other *** search
- /* This file is part of the Internet Configuration system and is placed in the public domain for the benefit of all.
-
- Useful debugging macros and such.
- */
-
- #ifndef icDebug
- #define icDebug 0
- #endif
-
- #if icDebug
- #define ICAssert(mustBeTrue) \
- do { if ( ! (mustBeTrue) ) { DebugStr("\pICAssert: Assertion failed! ; sc"); } } while (0)
- #define ICDebugStr(message) \
- DebugStr("\p" ## message)
- #define ICParamCheck(err, mustBeTrue, message) \
- do { if (err == noErr && ! (mustBeTrue)) { DebugStr("\pICParamCheck: " ## message ## "; sc"); err = paramErr; } } while (0)
- #else
- #define ICAssert(mustBeTrue) /* nothing */
- #define ICDebugStr(message) /* nothing */
- #define ICParamCheck(err, mustBeTrue, message) \
- do { if (err == noErr && ! (mustBeTrue)) { err = paramErr; } } while (0)
- #endif
-